<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
	</head>
	<body>
		<div id="app">
			现在年龄{{age}}
			<input type="button" value="显示/隐藏" @click="changIsShow"/>
			<input type="button" value="年龄变大" @click="addAge"/>
			<br/>
			<img src="img/u=697401579,323262224&fm=11&gp=0.jpg" v-show="isShow" />
			<h1 v-show="age>18">我成年了</h1>
			<img src="img/u=697401579,323262224&fm=11&gp=0.jpg" v-show="age > 18" />
			
		</div>
		
		<script type="text/javascript">
			var app = new Vue({
				el: "#app",
				data: {
					isShow: false,
					age: 16,
				},
				methods:{
					changIsShow:function(){
						this.isShow = !this.isShow;
					},
					addAge:function(){
						this.age++;
					}
				},
				
			})
		</script>
	</body>
</html>
